﻿Imports Publics
Imports System.Windows.Forms
Imports DevExpress.Utils
Imports System.Threading

Public Class FrmChonTuThangNamDenThangNam

    Private _TuThang As Integer
    Public Property TuThang() As Integer
        Get
            Return _TuThang
        End Get
        Set(ByVal value As Integer)
            _TuThang = value
        End Set
    End Property

    Private _TuNam As Integer
    Public Property TuNam() As Integer
        Get
            Return _TuNam
        End Get
        Set(ByVal value As Integer)
            _TuNam = value
        End Set
    End Property

    Private _DenThang As Integer
    Public Property DenThang() As Integer
        Get
            Return _DenThang
        End Get
        Set(ByVal value As Integer)
            _DenThang = value
        End Set
    End Property

    Private _DenNam As Integer
    Public Property DenNam() As Integer
        Get
            Return _DenNam
        End Get
        Set(ByVal value As Integer)
            _DenNam = value
        End Set
    End Property

    Private Sub FrmChonTuThangNamDenThangNam_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        'Thoát			
        If (e.Modifiers = GetKeyModifide(pIdThoat) And _
        e.KeyCode = GetKeyCode2(pIdThoat)) Or _
        (e.KeyCode = GetKeyCode(pIdThoat)) Then
            btnThoat_Click(Nothing, Nothing)
        End If
    End Sub

    Private Sub FrmChonTuThangNamDenThangNam_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        spinTuThang.EditValue = vIntKTThang
        spinTuNam.EditValue = vIntKTNam
        spinDenThang.EditValue = vIntKTThang
        spinDenNam.EditValue = vIntKTNam
    End Sub

    Private Sub btnDongY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDongY.Click
        TuThang = CInt(spinTuThang.EditValue)
        TuNam = CInt(spinTuNam.EditValue)
        DenThang = CInt(spinDenThang.EditValue)
        DenNam = CInt(spinDenNam.EditValue)
        Me.Close()
    End Sub

    Private Sub btnThoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThoat.Click
        Me.Close()
    End Sub
End Class
